package cn.tedu.boot.demo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
//使得set有返回值,返回当前对象
@Accessors(chain = true)
public class AdminAddNewDTO implements Serializable {

    @ApiModelProperty(value = "用户名",example = "admin001",required = true)
    @NotNull(message = "添加失败,用户名不能为空")
    private String username;
    @ApiModelProperty(value = "密码",example = "123456",required = true)
    @NotNull(message = "添加失败,密码不能为空")
    private String password;
    @ApiModelProperty(value = "昵称",example = "管理员1号",required = true)
    @NotNull(message = "添加失败,昵称不能为空")
    private String nickname;
}
